// fly_srv.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "server.hpp"
#include "handler\user_handler.h"
#include "handler\rtt_handler.h"

using namespace fly::jld::server;

int main(int argc, char* argv[])
{
	try
	{
		init_log();

		ucache->init();

		handler* hnd = (new user_handler())->init_branch();

		hnd->set_next(new rtt_handler());

		server srv(hnd, "::", "7777");

		srv.run();
	}
	catch (std::exception& e)
	{
		LOG_T_ERR(e.what());
	}
	return 0;
}

